<%@ page contentType="text/html; charset=UTF-8" language="java" import="com.config.SystemGlobals,java.util.*" errorPage="/error.jsp" %>
<%@ page import="com.beans.photo.*" %>
<%@ page import="com.business.photo.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<% String  title="图片列表"; %>
<%@ include file="header.jsp"%>
<% 	PhotoListBus llb=new PhotoListBus();
	PhotoTypeBus ptb=new PhotoTypeBus();
	List photoList=llb.getAllPhotoByUserName(username);
	List phototypeList=ptb.getAllTypes(username);	
  %>
<font color=red>您的相册中总共有<%=photoList.size()%>张图片</font>
<% if(phototypeList==null||phototypeList.size()==0) {%>
<br />
<center></center>
<br />
<% }else{
%>
<br />以下为图片列表：
<table>
<tr><th width="20%">相册名</th><th width=30% align="center">描述</th>
<th width=30% align=center>功能</th></tr>
<%
	for(int i=0;i<phototypeList.size();i++) 
	{
		PhotoType pt=(PhotoType)phototypeList.get(i);
%>
<tr><td width="20%"><%=pt.getPhototypeName()%></td><td width=30% align="left"><%=pt.getPhototypeMemo()%></td><td width=50% align=center>
<a href="updatephototype?action=edit&id=<%=pt.getPhototypeId()%>">修改</a>&nbsp;<a href="updatephototype?action=del&id=<%=pt.getPhototypeId()%>">删除</a></td></tr>
<%		} %>
</table>
<hr style="border:1px  dotted   #FFCC00 " />
<%
	}
 if(phototypeList==null||phototypeList.size()==0) {%>
<br />
<center><font color=red>还没有图片!</font></center>
<br />
<% }else{
%>

<table>
<tr><th>图片</th>
<th  width="30%" >相关信息</th>
<th>所在相册</th>
<th>是否显示</th>
<th width="20%" >功能选择</th>
</tr>
<%
for(int i=0;i<photoList.size();i++) {
PhotoDetail pd=(PhotoDetail)photoList.get(i);
%>
		
		  <tr color="red">
        <td ><img alt="<%=pd.getPhotoMemo()%>" src="<%=basePath+pd.getPhotoUrl()%>" width="100" height="100" align="left" /></td>
   
            <td  width="30%" align="left"><a href="photo/temp/<%=pd.getPhotoNo()%>.html"><b><%=pd.getPhotoName()%></b></a><br/><%=pd.getPhotoMemo()%><br/>加入时间：<%=pd.getAddTime()%><br/><a title="<%=basePath+pd.getPhotoUrl()%>" href="<%=basePath+pd.getPhotoUrl()%>"><font color=green>此图所在的服务器路径>></font></a></td>
			<td ><a href="photolist/<%=username%>/<%=pd.getPhototypeId()%>/"><%=(new PhotoTypeBus().getPhotoTypeById(Integer.parseInt(pd.getPhototypeId()))).getPhototypeName()%></a></td>
			<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%if(pd.getIsShow().equals("1")){%>是<%}else{%>否<%}%></td>
			  	<td width="20%" ><a href="updatephoto?action=edit&no=<%=pd.getPhotoNo()%>">修改</a>&nbsp;&nbsp;<a href="updatephoto?action=del&no=<%=pd.getPhotoNo()%>">删除</a></td>
        </tr>
		<%			}
			}
		%>
</table>
<%@include file="footer.jsp"%>
</body>

</html>
